﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

namespace СityDelivery
{
	class CityMap
	{

		private string mapPath = "";
		private Process mapProcess = null;

		public CityMap()
		{
			mapPath = Application.StartupPath;

		}

		public bool Start()
		{
			try
			{
				mapProcess = Process.Start(mapPath + "\\josm-tested.jar");
			}
			catch (SystemException e)
			{
				return false;
			}
			return true;
		}

		public bool Close()
		{
			if (mapProcess == null)
			{
				return false;
			}
			else
			{
				try
				{
					mapProcess.Close();
				}
				catch (SystemException e)
				{
					return false;
				}
				return true;
			}
		}
	}
}





